package com.lee.ssm.controller;

import com.lee.ssm.domain.SysLog;
import com.lee.ssm.service.ISysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller

@RequestMapping("/sysLog")
public class SysLogController {
    @Autowired
    private ISysLogService iSysLogService;

    @RequestMapping("/findAll")
    public ModelAndView findAll() throws Exception {
        ModelAndView mv=new ModelAndView();
        List<SysLog> list =iSysLogService.findAll();
        mv.setViewName("syslog-list");
        mv.addObject("sysLogs",list);
        return mv;

    }
}
